package com.sjp.utils;

import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.Player;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

public class MusicUtils {
    public static void play(){
        try {
            InputStream is = new FileInputStream("Music/music.mp3");
            Player player = new Player(is);
            player.play();
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        } catch (JavaLayerException e) {
            throw new RuntimeException(e);
        }
    }
}
